package cn.beyond.vehicleManagement.dao;
import cn.beyond.vehicleManagement.pojo.VehicleDeprecitionProcurement;
import cn.beyond.vehicleManagement.util.DataBaseUtil;

import java.util.List;
import java.util.Map;

public class VehicleDeprecitionProcurementDao {
    DataBaseUtil<VehicleDeprecitionProcurement> VehicleDeprecitionProcurementDao=
            new DataBaseUtil<>();

    /**
     * 添加折旧车辆购买记录
     * @return
     */
    public int addDeprecitionProcurement(VehicleDeprecitionProcurement vehicleDeprecitionProcurement){
        return    VehicleDeprecitionProcurementDao.addUtil(vehicleDeprecitionProcurement,
                "vehicle_deprecition_procurement");
    }

    /**
     * 删除折旧车辆购买记录
     * @param obj
     * @param column
     * @return
     */
    public int deleteDeprecitionProcurement(Object obj,String column){
        return VehicleDeprecitionProcurementDao.delByIdUtil(obj,"vehicle_deprecition_procurement",column);

    }

    /**
     * 修改折旧车辆购买记录
     * @return
     */
    public int update(VehicleDeprecitionProcurement vehicleDeprecitionProcurement){
        return  VehicleDeprecitionProcurementDao.updateByidUtil(vehicleDeprecitionProcurement,
                "vehicle_deprecition_procurement");
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public VehicleDeprecitionProcurement selectUserByOne(VehicleDeprecitionProcurement vehicleDeprecitionProcurement,
                                                         Map<String, Object> selectmap){
        return VehicleDeprecitionProcurementDao.selectONE(vehicleDeprecitionProcurement,"vehicle_deprecition_procurement",selectmap);
    }

    /**
     * 查询结果返回多条记录
     * @param selectmap
     * @return
     */
    public List<VehicleDeprecitionProcurement> selectUserByCondition(VehicleDeprecitionProcurement vehicleDeprecitionProcurement,
                                                                     Map<String, Object> selectmap){
        return  VehicleDeprecitionProcurementDao.selectAll(vehicleDeprecitionProcurement,
                "vehicle_deprecition_procurement",selectmap);
    }
}
